
//
//  LRXHelpMoreInfoCell.m
//  路人侠
//
//  Created by zhangxulong on 3/6/16.
//  Copyright © 2016 zhangxulong. All rights reserved.
//

#import "LRXHelpMoreInfoCell.h"
@interface LRXHelpMoreInfoCell()
@property (nonatomic,strong) UILabel * thingName;
@property (nonatomic,strong) UILabel * thingMoney;
@end

@implementation LRXHelpMoreInfoCell
- (UILabel *)thingMoney{
    if (_thingMoney == nil) {
        _thingMoney = [[UILabel alloc]init];
    }
    return _thingMoney;
}
- (UILabel *)thingName{
    if (_thingName == nil) {
        _thingName = [[UILabel alloc]init];
    }
    return _thingName;
}

- (void)layoutHelpMoreCell:(LRXThing * )thing
{
    
    NSString * thingCount;
    if ([thing.thingCount integerValue] > 1)
        thingCount = [NSString stringWithFormat:@"x%@",thing.thingCount];
    else
        thingCount = @"";

    self.thingName.text = [NSString stringWithFormat:@"%@%@",thing.thingName, thingCount];
    self.thingMoney.text = [NSString stringWithFormat:@"%@元",thing.thingMoney];
    self.thingName.textColor = [UIColor colorWithRed:99 green:99 blue:99];
    self.thingMoney.textColor = self.thingName.textColor;
    self.thingName.frame = CGRectMake(10 * wScale, 10 * hScale, 0, 0);
    self.thingName.font = [UIFont systemFontOfSize: 28 * hScale];
    [self.thingName sizeToFit];
    
    
    self.thingMoney.frame = CGRectMake(280 *wScale, 10 *hScale, 0, 0);
    self.thingMoney.font = self.thingName.font;
    [self.thingMoney sizeToFit];
    
    [self addSubview:self.thingName];
    [self addSubview:self.thingMoney];
}
@end
